package core
{
	import flash.display.DisplayObject;
	import flash.text.TextField;

	public class MapRes extends GameData
	{
		/**
		 * 资源名称
		 */
		public var resName : String;
		/**
		 * 偏移坐标
		 */
		public var offsetX : int;
		public var offsetY : int;

		protected var element : DisplayObject;

		public function MapRes()
		{
		}

		public function remove() : void
		{
			if(element && element.parent)
			{
				element.parent.removeChild(element);
				element = null;
			}
			offsetX = 0;
			offsetY = 0;
			resName = "";
		}

		public function setElement(value : DisplayObject) : void
		{
			this.element = value;
		}

		public function getElement() : DisplayObject
		{
			return element
		}

		public function toString() : String
		{
			return resName + "," + offsetX + "," + offsetY;
		}
	}
}